package com.bubblegumproject.ogo.action;

import java.io.Serializable;

/**
 * An Action describes something that's happened within the system that was caused by a client of the system.
 *
 * @author Azubuko Obele (buko.obele@gmail.com)
 */
public interface Action extends Serializable {

    public Source getSource();

    public void setSource(Source source);

    /**
     * Get the Context for this Action. Note that the Context is generally not considered part of an Action object's
     * persistent state (it is transient). The Context is only usable during the processing of the Action.
     *
     * @return Context containing request-specific data
     */
    public Context getContext();

    //public void setContext(Context context);

    public void setFlow(Flow flow);

    public Flow getFlow();

    public ActionErrorStack errors();

    public void setErrors(ActionErrorStack errors);

    // SMELL: This is a bit of a smell
    public void inherit(Context context);
}
